package net.ck.hzq;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;



public class Fragment1_businessmanagement extends Fragment {

    private View mRootView;

    private RelativeLayout businessmanagment_relat1, businessmanagment_relat2;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater,
                             @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        if (mRootView == null) {
            mRootView = inflater.inflate(R.layout.fragment1_businessmanagement, container, false);
        }
        ViewGroup parent = (ViewGroup) mRootView.getParent();
        if (parent != null) {
            parent.removeView(mRootView);
        }

        businessmanagment_relat1 = (RelativeLayout) mRootView.findViewById(R.id.businessmanagment_relat1);
        businessmanagment_relat2 = (RelativeLayout) mRootView.findViewById(R.id.businessmanagment_relat2);
        businessmanagment_relat1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), PosRecordActivity.class);
                intent.putExtra("type", "1");
                startActivity(intent);
            }
        });
        businessmanagment_relat2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), PosRecordActivity.class);
                intent.putExtra("type", "2");
                startActivity(intent);
            }
        });

        return mRootView;
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
    }

}
